import request from "@/api/index";

// 1.获取聊天室信息
export function getRoomInfo(data) {
  return request({
    url: "/room/info/getRoomInfo",
    method: "get",
    params: data
  });
}
// 2.获取聊天室内用户权限接口
export function getUserPermiss(data) {
  return request({
    url: "/room/user/getPermissionList",
    method: "get",
    params: data
  });
}
// 3.获取聊天室内麦位信息接口
export function getMicPosition(data) {
  return request({
    url: "/room/info/getMicInfo",
    method: "get",
    params: data
  });
}
// 4.检测队长活跃接口
export function getCaptainSchedule(data) {
  return request({
    url: "/user/captain/task/captainSchedule",
    method: "get",
    params: data
  });
}
// 5.获取车队列表接口
export function getRoomFleetList(data) {
  return request({
    url: "/room/fleet/room/list",
    method: "get",
    params: data
  });
}
// 6.获取当前用户车队详情接口
export function getRoomFleetInfo(data) {
  return request({
    url: "/room/fleet/fleetInfo",
    method: "post",
    data: data
  });
}
// 7.上麦下麦接口
export function upperLowerMic(data) {
  return request({
    url: "/room/mic/upperLowerMic",
    method: "post",
    data: data
  });
}
// 8.退出房间接口
export function leaveRoom(data) {
  return request({
    url: "/room/info/leaveRoom",
    method: "post",
    data: data
  });
}
// 9.加入房间接口
export function joinRoom(data) {
  return request({
    url: "/room/info/joinRoom",
    method: "post",
    data: data
  });
}
// 10.web获取聊天室地址
export function chatroomAddresses(data) {
  return request({
    url: "/room/info/getWebAddr",
    method: "get",
    params: data
  });
}
// 聊天室公屏发送文本或表情检测
export function checkRoomMsg(data) {
  return request({
    url: "/room/info/checkRoomMsg",
    method: "post",
    data: data
  });
}
// 聊天室内获取在线用户列表
export function getOnlineUser(data) {
  return request({
    url: "/room/user/getOnlineUserList",
    method: "get",
    params: data
  });
}
// 聊天室内创建新的车队
export function newFleet(data) {
  return request({
    url: "/room/fleet/new",
    method: "post",
    data: data
  });
}
// 聊天室内解散车队
export function closeFleet(data) {
  return request({
    url: "/room/fleet/close",
    method: "post",
    data: data
  });
}
// 聊天室内退出车队
export function quitFleet(data) {
  return request({
    url: "/room/fleet/quit",
    method: "post",
    data: data
  });
}
// 加入车队
export function upFleet(data) {
  return request({
    url: "/room/fleet/up",
    method: "post",
    data: data
  });
}
// 踢出车队
export function removeFleet(data) {
  return request({
    url: "/room/fleet/remove",
    method: "post",
    data: data
  });
}
//  表情list
export function getEmotList() {
  return request({
    url: "/misc/emoticon/list",
    method: "get"
  });
}
// 礼物 背包list

export function getGiftList(data) {
  return request({
    url: "/item/gift/getPanelGiftList",
    method: "get",
    params: data
  });
}
// 送礼物 ?roomId=${data.roomId}&fid=${data.fid}&toUid=${data.toUid}&giftId=${data.giftId}&num=${data.num}&giftType=${data.giftType}&mic=${data.mic}&mark=${data.mark}
export function sendGift(data) {
  return request({
    url: `/assets/gift/sendNew`,
    method: "post",
    data: data
  });
}
// 榜单
export function getRoomRank(data) {
  return request({
    url: "/room/user/getRoomRank",
    method: "get",
    params: data
  });
}
// 抱上麦抱下麦
export function inviteUpOrDown(data) {
  return request({
    url: "/room/mic/operatorUpperLowerMic",
    method: "post",
    data: data
  });
}
// 禁言取消禁言 或者 踢出取消踢出
export function addOrRemove(data) {
  return request({
    url: "/room/black/addOrRemove",
    method: "post",
    data: data
  });
}
// 0锁麦。。1解锁麦
export function roomMicLockSwitch(data) {
  return request({
    url: "/room/setting/roomMicLockSwitch",
    method: "post",
    data: data
  });
}
// 0禁麦，和1解锁禁麦
export function roomMicDisableSwitch(data) {
  return request({
    url: "/room/setting/roomMicDisableSwitch",
    method: "post",
    data: data
  });
}
// 清空麦位心动值
export function clearCardiacValue(data) {
  return request({
    url: "/room/mic/clearCardiacValue",
    method: "post",
    data: data
  });
}
// 封禁用户
export function prohibitUser(data) {
  return request({
    url: "/room/user/prohibitUser",
    method: "post",
    data: data
  });
}
// 获取用户信息
export function checkUserInfo(data) {
  return request({
    url: "/room/user/getRoomUserCard",
    method: "get",
    params: data
  });
}
export function searchRecommendRoom(data) {
  return request({
    url: "/misc/search/searchRecommendRoom",
    method: "post",
    data: data
  });
}
// 检测队长mic活跃度
export function micCheck(data) {
  return request({
    url: "/user/captain/task/micCheck",
    method: "get",
    params: data
  });
}
// 车队开车接口
export function startFleet(data) {
  return request({
    url: "/room/fleet/startFleet",
    method: "post",
    data: data
  });
}
// 关注或取关房间
export function addOrRemoveFollow(data) {
  return request({
    url: "/user/relationship/addOrRemoveFollow",
    method: "post",
    data: data
  });
}
// 获取背景图列表
export function getBGList(data) {
  return request({
    url: "/room/background/getList",
    method: "get",
    params: data
  });
}
// 获取创建车队标签数据
export function userLabelConfig(data) {
  return request({
    url: "/room/fleet/userLabelConfig",
    method: "get",
    params: data
  });
}
// 队长周榜奖励排行榜
export function captainRanking(data) {
  return request({
    url: "/user/captain/ranking/week",
    method: "get",
    params: data
  });
}
// 队长奖励 等级奖励排行榜
export function capAward(data) {
  return request({
    url: "/user/capLevel/capAward",
    method: "get",
    params: data
  });
}
// 房间内人数接口
export function getOnlineUserCount(data) {
  return request({
    url: "/room/user/getOnlineUserCount",
    method: "get",
    params: data
  });
}
